package com.hera.process.config.service.impl;

import java.util.List;

import org.apache.log4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.hera.base.util.FiltroDTO;
import com.hera.process.config.dao.ConditionDao;
import com.hera.process.config.domain.Condition;
import com.hera.process.config.service.ConditionService;

@Service("conditionservice")
public class ConditionServiceImpl implements ConditionService{

	static final Logger logger = Logger.getLogger(UserServiceImpl.class);
	
	@Autowired
	private ConditionDao conditiondao;
	
	@Override
	public Condition findById(Long id) {
		
		return conditiondao.findOne(id);
	}

	@Override
	public void update(Condition entity) {
		
		conditiondao.save(entity);
	}

	@Override
	public void save(Condition entity) {
		conditiondao.save(entity);
	}

	@Override
	public void delete(Condition entity) {
		
		conditiondao.delete(entity);
	}

	@Override
	public List<Condition> findAll() {		
		return conditiondao.findAll();
	}

	@Override
	public List<Condition> findAll(FiltroDTO filtroDTO) {		
		return conditiondao.obtenerEntidadesPorFiltros(filtroDTO);
	}

}
